import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/AboutView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      // component: HomeView
      component:  () => import( '../views/todolist/index.vue' )
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue')
    },
    {
      path: '/managementSystem',
      name: 'managementSystem',
      redirect:'/index',
      component: () => import('../layout/index.vue'),
      children:[
        //首页
        {
          path: '/index',
          name: 'index',
          component: () => import('../views/index/index.vue')
        },
         //系统管理
        {
          path: '/system',
          name: 'system',
          component: () => import('../views/system/index.vue')
        },
         //人员管理页面
        {
          path: '/systemRole',
          name: 'systemRole',
          component: () => import('../views/systemRole/index.vue')
        },
        //大屏页面
        {
          path: '/echarts',
          name: 'echarts',
          component: () => import( '../views/echarts/index.vue' )
        },
        {
          path: '/goCss',
          name: 'goCss',
          component: () => import( '../views/goCss/index.vue' )
        },
        {
          path: '/textBus',
          name: 'textBus',
          component: () => import( '../views/textBus/index.vue' )
        },
        //导入并展示

        // {
        //   path: '/importEcharts',
        //   name: 'importEcharts',
        //   component: () => import( '../views/importEcharts/import.vue' )
        // },
        {
          path: '/dragAndDropSort',
          name: 'dragAndDropSort',
          component: () => import( '../views/dragAndDropSort/index.vue' )
        },
        {
          path: '/iframe',
          name: 'iframe',
          component: () => import( '../views/iframe/index1.vue' )
        },
        {
          path: '/goSUN',
          name: 'goSUN',
          component: () => import( '../views/gosun/index.vue' )
        },
        {
          path: '/aiDh',
          name: 'aiDh',
          component: () => import( '../views/aiDh/index.vue' )
        },
        {
          path: '/todolist',
          name: 'todolist',
          component: () => import( '../views/todolist/index.vue' )
        }
        
      ]
    }
    
  ]
})

export default router
